#include "UdpServe.hpp"
#include "dic.hpp"

// std::string ClearUp(std::string s)
// {
//     std::string message("Serve Say#");

//     message += s;

//     return message;
// }

std::string ClearUp(std::string s)
{
    Word::Dic dic;

    dic.AddWord();

    std::string ret = dic.Translate(s);

    return ret == "" ? "None" : ret;
}

int main(int argc,char* argv[])
{
    if(argc != 2)
    {
        return 1;
    }

    Socket_Module::Socket socket(std::stoi(argv[1]),ClearUp);

    socket.Init();
 
    socket.Start();

    return 0;
}